package com.jiuqi.irs.generator.dao.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="TB_UNITITEM"
 *     
*/
public class TbUnititem implements Serializable {

    /** identifier field */
    private String uiGuid;

    /** persistent field */
    private String orgCode;

    /** persistent field */
    private String itemCode;

    /** nullable persistent field */
    private String chargingType;

    /** nullable persistent field */
    private BigDecimal chargingUp;

    /** nullable persistent field */
    private BigDecimal chargingDown;

    /** nullable persistent field */
    private String measureUnit;

    /** nullable persistent field */
    private String checkCode;

    /** persistent field */
    private String year;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public TbUnititem(String uiGuid, String orgCode, String itemCode, String chargingType, BigDecimal chargingUp, BigDecimal chargingDown, String measureUnit, String checkCode, String year, String reserved1, String reserved2, String reserved3) {
        this.uiGuid = uiGuid;
        this.orgCode = orgCode;
        this.itemCode = itemCode;
        this.chargingType = chargingType;
        this.chargingUp = chargingUp;
        this.chargingDown = chargingDown;
        this.measureUnit = measureUnit;
        this.checkCode = checkCode;
        this.year = year;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public TbUnititem() {
    }

    /** minimal constructor */
    public TbUnititem(String uiGuid, String orgCode, String itemCode, String year) {
        this.uiGuid = uiGuid;
        this.orgCode = orgCode;
        this.itemCode = itemCode;
        this.year = year;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="UI_GUID"
     *         
     */
    public String getUiGuid() {
        return this.uiGuid;
    }

    public void setUiGuid(String uiGuid) {
        this.uiGuid = uiGuid;
    }

    /** 
     *            @hibernate.property
     *             column="ORG_CODE"
     *             length="42"
     *             not-null="true"
     *         
     */
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /** 
     *            @hibernate.property
     *             column="ITEM_CODE"
     *             length="42"
     *             not-null="true"
     *         
     */
    public String getItemCode() {
        return this.itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    /** 
     *            @hibernate.property
     *             column="CHARGING_TYPE"
     *             length="3"
     *         
     */
    public String getChargingType() {
        return this.chargingType;
    }

    public void setChargingType(String chargingType) {
        this.chargingType = chargingType;
    }

    /** 
     *            @hibernate.property
     *             column="CHARGING_UP"
     *             length="16"
     *         
     */
    public BigDecimal getChargingUp() {
        return this.chargingUp;
    }

    public void setChargingUp(BigDecimal chargingUp) {
        this.chargingUp = chargingUp;
    }

    /** 
     *            @hibernate.property
     *             column="CHARGING_DOWN"
     *             length="16"
     *         
     */
    public BigDecimal getChargingDown() {
        return this.chargingDown;
    }

    public void setChargingDown(BigDecimal chargingDown) {
        this.chargingDown = chargingDown;
    }

    /** 
     *            @hibernate.property
     *             column="MEASURE_UNIT"
     *             length="20"
     *         
     */
    public String getMeasureUnit() {
        return this.measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    /** 
     *            @hibernate.property
     *             column="CHECK_CODE"
     *             length="4"
     *         
     */
    public String getCheckCode() {
        return this.checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

    /** 
     *            @hibernate.property
     *             column="YEAR"
     *             length="4"
     *             not-null="true"
     *         
     */
    public String getYear() {
        return this.year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="100"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="150"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("uiGuid", getUiGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof TbUnititem) ) return false;
        TbUnititem castOther = (TbUnititem) other;
        return new EqualsBuilder()
            .append(this.getUiGuid(), castOther.getUiGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getUiGuid())
            .toHashCode();
    }

}
